home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / com / computer / casio_st / prog_fx / oisac2 / l_5550.txt < prev    next >
Text File  |  1994-03-01  |  921b  |  23 lines

  1. 5 ONERRORGOTO500
  2. 10 MODE8:DIM:ERASEa:DIMa(8):l$="abr":m$="x1y1x2y2x3y3":c$=CHR$(5)
  3. 20 CLS:PRINT"Circle  (x1,y1),(x2,y2),(x3,y3)";
  4. 30 FORk=0 TO5
  5. 40 LOCATE0,1:PRINTc$;MID$(m$,1+2*k,2);"=";a(k);"?";:INPUT@42;a(k):LOCATE0,0
  6. 50 NEXT:LOCATE0,1:PRINTc$;
  7. 60 a=a(0)-a(2):b=a(0)+a(2):c=a(1)-a(3):d=a(1)+a(3):e=(a*b+c*d)/2
  8. 70 f=a(2)-a(4):g=a(2)+a(4):h=a(3)-a(5):i=a(3)+a(5):j=(f*g+h*i)/2
  9. 80 IFa*h-c*f<>0 THENa(7)=(a*j-e*f)/(a*h-c*f) ELSE160
  10. 90 IFa<>0 THENa(6)=(e-a(7)*c)/a ELSEIFf<>0 THENa(6)=(j-a(7)*h)/f ELSE160
  11. 100 a(8)=SQR((a(0)-a(6))^2+(a(1)-a(7))^2)
  12. 110 CLS:PRINT"Circle  (x-a)ý+(y-b)ý=rý";:PRINT
  13. 120 FORk=1 TO3:PRINTc$;MID$(l$,k,1);" =";a(k+5);
  14. 125 w=ASC(INPUT$(1,@)):IFw=13 THEN140
  15. 130 IFw=30 ANDk>1 THENk=k-2:GOTO140
  16. 132 IFw=31 ANDk<3 THEN140
  17. 138 GOTO125
  18. 140 NEXT:GOTO20
  19. 160 LOCATE0,1:PRINTc$;"not found";:w$=INPUT$(1,@):GOTO20
  20. 500 IFERR=1 THENCLS:ONERRORGOTO0
  21. 510 IFERL=40 THENRESUME40
  22. 520 RESUME160
  23.